//
//  AlreadyAnnouncedCell.m
//  YunGou
//
//  Created by macbook on 16/6/6.
//  Copyright © 2016年 macbook. All rights reserved.
//

#import "AlreadyAnnouncedCell.h"
#import "NSString+DateTransform.h"
#import <UIImageView+WebCache.h>
@interface AlreadyAnnouncedCell ()
@property (weak, nonatomic) IBOutlet UIImageView *thumbImg;
@property (weak, nonatomic) IBOutlet UILabel *titLabel;
@property (weak, nonatomic) IBOutlet UILabel *announceTimeLabel;
@property (weak, nonatomic) IBOutlet UILabel *buyNumberLabel;
@property (weak, nonatomic) IBOutlet UILabel *winner;
@property (weak, nonatomic) IBOutlet UILabel *priceLabel;
@end

@implementation AlreadyAnnouncedCell

- (void)awakeFromNib {
    // Initialization code
    
}

- (void)setAnnounceModel:(ProductModel *)announceModel{
    [_thumbImg sd_setImageWithURL:[NSURL URLWithString:[ImageUrl stringByAppendingString:announceModel.thumb]]];
    _titLabel.text = announceModel.title;
    _priceLabel.text = [NSString stringWithFormat:@"价值：￥%@",announceModel.money];
    _winner.text = announceModel.username;
    _buyNumberLabel.text = announceModel.gonumber;
    _announceTimeLabel.text = [NSString timeTransformWithString:[NSString stringWithFormat:@"%lf",announceModel.q_end_time] andFormatter:@"yyyy.MM.dd HH:MM:ss"];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
